package com.clkj.xiuzheng.dao.shangcheng;

import com.clkj.xiuzheng.pojo.shangcheng.Banner;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface BannerMapper extends Mapper<Banner> {
    @Select("select * from t_xz_banner where picture_status = 1 and datediff(day,start_time,getDate()) >=0 and datediff(day,end_time,getDate()) <0")
    List<Banner> listBanner();


    @Select("select * from t_xz_banner where picture_status = 1 and datediff(day,start_time,#{today}) >=0 and datediff(day,end_time,#{today}) <0 and picture_status =1  ")
    List<Banner> getBanner(String today);

    @Select("select * from t_xz_banner order by banner_id desc  ")
    List<Banner> getlistBanner();
}
